Skip to content

[JVM Windows] Process shutdown bug #162

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 7, 2025
Merged

[JVM Windows] Process shutdown bug #162

merged 5 commits into from
Apr 7, 2025

Conversation

stevensJourney
Copy link
Contributor

Overview

For JVM we currently find the PowerSync SQLite core resource's path then copy it to a temporary file. The temporary file is used when loading the extension in SQLite. The temporary file is deleted on process shutdown.

#161 raised that on Windows an issue occurs when deleting the temporary file.

It looks like this method, of using a temporary file, was used in order to resolve the extension's path in a format compatible with Windows. Typically the R::class.java.getResource(path) result is of the format /c:/... which does not seem to work as an extension path in SQLite.

The logic has been updated to avoid the use of temporary files altogether. The binary resource file path is now used to load the SQLite extension.

@stevensJourney stevensJourney requested a review from simolus3 April 7, 2025 08:57
@stevensJourney stevensJourney marked this pull request as ready for review April 7, 2025 08:57
Copy link
Contributor

@simolus3 simolus3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 👍

@simolus3
Copy link
Contributor

simolus3 commented Apr 7, 2025

Let's see if merging the test changes does something about the flakiness 🤞

@stevensJourney stevensJourney merged commit fc06c3b into main Apr 7, 2025
3 checks passed
@stevensJourney stevensJourney deleted the windows-fix branch April 7, 2025 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants